package com.example.demo.repository;

import com.example.demo.domain.db.Order;
import com.example.demo.domain.db.OrderInfo;
import com.example.demo.domain.solr.Orders;

/**
 * @Description
 * @Author <a href="hedong.wu@baozun.com">wuhedong</a>
 * @Date 2020/6/1 9:39
 **/
public class OrdersUtil {

    public static void mergeOrdersWithorder(Orders orders, Order order){
        orders.setOrderCode(order.getOrderCode());
        orders.setUserAddress(order.getUserAddress());
        orders.setUserName(order.getUserName());
    }

    public static void mergeOrdersWithorderinfo(Orders orders, OrderInfo orderInfo){
        orders.setUserPhone(orderInfo.getUserPhone());
        orders.setUserEmail(orderInfo.getUserEmail());
    }

}
